// pages/Exclusive/Exclusive.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
    title:'我的主页',
    mode:1,
    play:1,
    ismoth:false,
    albumnavcurrent:1,
    isselect:false,
  },
  onLoad: function (options) {
   
  },
  onReachBottom: function () {

  },
  onShareAppMessage: function () {

  },
  onReady() {
      this.Dialog = this.selectComponent('#Dialog');
  },
  onPageScroll:function(e){ // 获取滚动条当前位置
    if(e.scrollTop>20){
      this.setData({defaultFix:true})
    }else{
      this.setData({defaultFix:false})
    }
  },
  mode(e){
    var mode = e.currentTarget.dataset.mode;
    this.setData({
      mode: mode
    })
  },
  play(e){
    var play = e.currentTarget.dataset.play;
    this.setData({
      play: play
    })
  },
  datechange(){
    this.setData({
      ismoth:!this.data.ismoth
    })
  },
  albumnav(e){
    var index = e.currentTarget.dataset.index;
    this.setData({
      albumnavcurrent: index
    })
  },
  delete(){
    this.Dialog.ShowDialog({
        type: 'Confirm',
        title: '删除选中的音频不可恢复?',
        btnArray: [{
                title: '取消',
                name: 'cancel',
                class: ''
            },
            {
                title: '确认删除',
                name: 'confirm',
                class: 'confirm'
            }
        ],
        callback: res => {
            if (res.name == 'confirm') {
              
                this.Dialog.CloseDialog();
            } else {
                this.Dialog.CloseDialog();
            }
        }
    })
  },
  select(){
    this.setData({
      isselect:true
    })
  },
})